sql server

您所在的位置:网站首页 trigger into action sql server

sql server

#sql server| 来源: 网络整理| 查看: 265

Suppose we have the following situation:

We have a table (let's say Table_A), wich has a trigger on INSERT. The trigger job is to update some rows in table_B based on the inserted values in table_A.

Now, everything is ok when we simple insert a row in the table, but what about situations where we insert data through a transaction?. Will the trigger wait until all transactions statements run successfully, or it will be fired the moment it recognizes the insert?. If the trigger fires immediately when it recognizes the first insert, what will happen if the transaction fail on the last row?. Is there some mechanism for that situation?.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3